package com.qianfeng.zhangwei.day30_bdmap.base;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;

import com.baidu.mapapi.map.BaiduMapOptions;
import com.baidu.mapapi.map.MapStatus;
import com.baidu.mapapi.map.SupportMapFragment;
import com.baidu.mapapi.model.LatLng;
import com.qianfeng.zhangwei.day30_bdmap.R;

/**
 * 22.569645
 * 113.884268
 */
public class FmMapActivity extends AppCompatActivity {
    /**
     * 百度地图fragment
     */

    private SupportMapFragment mapFragment;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_fm_map);
        BaiduMapOptions options = new BaiduMapOptions();
        LatLng latLng = new LatLng(22.569645, 113.884268);
        MapStatus.Builder builder = new MapStatus.Builder().target(latLng).zoom(18);
        options.mapStatus(builder.build());
        mapFragment = SupportMapFragment.newInstance(options);
        getSupportFragmentManager().beginTransaction().add(R.id.fragment_contaitner,mapFragment).commit();
    }
}
